if [ $# == 2 ]; then
	echo -n ""
else
	echo "usage: smt-tune-all #itr-start #itr-end"
	echo "ex:    smt-tune-all 0 3"
	exit
fi

for i in $(seq $1 $2)
do
	echo iteration-$i
	log=smt-log.${i}; rm -rf $log
	echo -n "[Start] " >> $log
	date >> $log
	cd i${i}

	cd smt;
	time make realall;
	time make tune_ test_all_tuned eval_all_tuned
	cd ..


	# end
	echo -n "[End] " >> ../$log
	date >> ../$log
	cd ..
done


